<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" xmlns:th="http://www.thymeleaf.org/">
    <title>Title</title>
</head>
<body>
<script>
function add(){
    alert("添加学生成功");
}
</script>
<table border="1">
    <tr>
        <td>学号</td>
        <td>姓名</td>
        <td>年龄</td>
        <td>性别</td>
        <td>操作</td>
    </tr>
    <tr th:each="concat:${st}">
        <td th:text="${concat.sno}"></td>
        <td th:text="${concat.sname}"></td>
        <td th:text="${concat.sage}"></td>
        <td th:text="${concat.ssex}"></td>
        <td>
            <a  th:href="@{'/student/getById/'+${concat.sno}}">修改</a>
            <a  th:href="@{'/student/deleteById/'+${concat.sno}}">删除</a>
        </td>
    </tr>
</table>
<div>
    <title>新增学生</title>
    <form action="/student/addStudent"method="post">
    姓名: <input type="text" th:value="${sname}" name="sname"><br>
    年龄: <input type="text" th:value="${sage}" name="sage"><br>
    性别: <input type="text" th:value="${ssex}" name="ssex"><br>
        <button  onclick="add()" type="submit">添加学生</button>
    </form>
</div>
</body>
</html>